package org.jeecg.modules.travel.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.travel.entity.JhAttraction;
import org.jeecg.modules.travel.vo.attraction.AppAttractionRecordVo;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 景点表
 * @Author: jeecg-boot
 * @Date:   2025-04-19
 * @Version: V1.0
 */
public interface JhAttractionMapper extends BaseMapper<JhAttraction> {

    IPage<AppAttractionRecordVo> queryAttractionList(Page<JhAttraction> page, @Param(Constants.WRAPPER) QueryWrapper<JhAttraction> queryWrapper, @Param("lon") BigDecimal lon, @Param("lat") BigDecimal lat);

    List<String> selectRandomIds(@Param("number") int number);

    List<AppAttractionRecordVo> randomAttractionList(@Param("pageIds") List<String> pageIds);

    int updateLocation(@Param("id") String id, @Param("lon") BigDecimal lon, @Param("lat") BigDecimal lat);

    boolean updateAttraction(JhAttraction attraction);

}
